package dto

import "gitee.com/song-yao-shun/MQH/model"

type FullSceneDto struct {
	ID 				int 		`json:"id"`
	Name			string		`json:"name"`
	SceneId			int			`json:"scene_id"`
	SceneName		string		`json:"scene_name"`
	Type 			string 		`json:"type"`
	Desc 			string 		`json:"desc"`
	CreatedAt 		model.Time 	`json:"created_at"`
	UpdatedAt 		model.Time 	`json:"updated_at"`
}

type SampleSceneDto struct {
	Id 			int 	`json:"id"`
	Name		string	`json:"name"`
	Type 		string 	`json:"type"`
}

// 定义转换函数
func ToSceneDto(fullScenes []FullSceneDto) (result []SampleSceneDto){

	for i :=0; i < len(fullScenes); i++{
		res := SampleSceneDto{
			Id:		fullScenes[i].ID,
			Name: 	fullScenes[i].Name,
			Type:	fullScenes[i].Type,
		}
		result = append(result, res)
	}
	return
}
